package cn.comtom.ewbs.signature.common.enums;

/**
 * @Description: 验签方式类型
 **/
public enum SignTypeEnum {
    /*
     * 江南天安签名服务器
     */
    sjj1507("1","sjj1507"),
    /*
     * 江南天安密码器
     */
    sjj1313("2","sjj1313"),
    /*
     * 江南科友签名服务器
     */
    srj1401("3","srj1401"),
    /*
     * 江南科友密码器
     */
    shm1814("4","shm1814"),
    /*
     * 江南天安密码器
     */
    sjj1303("5","sjj1303"),
    /*
     * softalg软签
     */
    softalg("6","softalg")
    ;

    private String code;

    private String type;


    SignTypeEnum(String code, String type) {
        this.code = code;
        this.type =type;
    }


    public String getCode() {
        return code;
    }


    public void setCode(String code) {
        this.code = code;
    }


    public String getType() {
        return type;
    }


    public void setType(String type) {
        this.type = type;
    }

    private String type() {
        return this.type;
    }

    private String code() {
        return this.code;
    }
    public static String getType(String code) {
        SignTypeEnum[] carTypeEnums = values();
        for (SignTypeEnum carTypeEnum : carTypeEnums) {
            if (carTypeEnum.code().equals(code)) {
                return carTypeEnum.type();
            }
        }
        return null;
    }
}
